package cn.edu.scnu.semart.user.mapper;

import cn.edu.scnu.semart.model.user.UserFollow;
import cn.edu.scnu.semart.vo.user.FollowUserVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserFollowMapper extends BaseMapper<UserFollow> {
    /**
     * 分页查询“我”的关注列表
     */
    IPage<FollowUserVo> pageFollows(Page<FollowUserVo> page,
                                    @Param("currentUserId") Integer currentUserId);

    /**
     * 分页查询“我”的粉丝列表
     */
    IPage<FollowUserVo> pageFans(Page<FollowUserVo> page,
                                 @Param("currentUserId") Integer currentUserId);
}